FROM ubuntu
LABEL description="aliyun source,python2.7,node12,make from git source"

COPY aliyun.source /etc/apt/sources.list
COPY make-python.sh /opt/make-python.sh
COPY make-node.sh /opt/make-node.sh
COPY make-code.sh /opt/make-code.sh


ENV KONGA_HOME /opt/konga
ENV NODEJS_HOME /opt/node-v12.13.0-linux-x64
ENV PYTHON2_HOME /opt/Python-2.7.17
ENV PATH $NODEJS_HOME/bin:$PYTHON2_HOME:$PATH

RUN  apt-get clean all \
    && apt-get update && apt-get upgrade -y \
    && apt-get install -y unzip git wget software-properties-common gcc make g++ \
    && chmod a+x /opt/make-python.sh \
    && chmod a+x /opt/make-node.sh \
    && chmod a+x /opt/make-code.sh \
    && /opt/make-python.sh \
    && /opt/make-node.sh \
    && /opt/make-code.sh \
    && apt --purge remove -y unzip git wget gcc make g++


    #&& curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun \


WORKDIR /opt/konga

VOLUME /opt/konga/kongadata
ENTRYPOINT /opt/konga/start.sh

# for main web interface:
EXPOSE 1337
